package com.example.sup.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.util.Date;
import lombok.Data;

/**
 * 
 * @TableName threshold_setting
 */
@TableName(value ="threshold_setting")
@Data
public class ThresholdSetting implements Serializable {
    /**
     * 阀值设置表
     */
    @TableId(type = IdType.AUTO)
    private Integer threId;

    /**
     * 监室类型id
     */
    private Integer prisonTypeId;

    /**
     * 监室类型名称
     */
    private String prisonTypeName;

    /**
     * 适用通道多个用逗号分隔
     */
    private String channel;

    /**
     * 最高电压
     */
    private Integer maxVoltage;

    /**
     * 最低电压
     */
    private Integer miniVoltage;

    /**
     * 最高电流
     */
    private Double maxCurrent;

    /**
     * 适用于设备类型  1、4路 4、32路
     */
    private Integer type;

    /**
     * 最低电流
     */
    private Double miniCurrent;

    /**
     * 最高温度
     */
    private Double maxTemperature;

    /**
     * 预留字段1
     */
    private String reservedFields1;

    /**
     * 预留字段2
     */
    private String reservedFields2;

    /**
     * 
     */
    private Date createTime;

    /**
     * 
     */
    private String createBy;

    /**
     * 
     */
    private Date updateTime;

    /**
     * 
     */
    private String updateBy;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        ThresholdSetting other = (ThresholdSetting) that;
        return (this.getThreId() == null ? other.getThreId() == null : this.getThreId().equals(other.getThreId()))
            && (this.getPrisonTypeId() == null ? other.getPrisonTypeId() == null : this.getPrisonTypeId().equals(other.getPrisonTypeId()))
            && (this.getPrisonTypeName() == null ? other.getPrisonTypeName() == null : this.getPrisonTypeName().equals(other.getPrisonTypeName()))
            && (this.getChannel() == null ? other.getChannel() == null : this.getChannel().equals(other.getChannel()))
            && (this.getMaxVoltage() == null ? other.getMaxVoltage() == null : this.getMaxVoltage().equals(other.getMaxVoltage()))
            && (this.getMiniVoltage() == null ? other.getMiniVoltage() == null : this.getMiniVoltage().equals(other.getMiniVoltage()))
            && (this.getMaxCurrent() == null ? other.getMaxCurrent() == null : this.getMaxCurrent().equals(other.getMaxCurrent()))
            && (this.getType() == null ? other.getType() == null : this.getType().equals(other.getType()))
            && (this.getMiniCurrent() == null ? other.getMiniCurrent() == null : this.getMiniCurrent().equals(other.getMiniCurrent()))
            && (this.getMaxTemperature() == null ? other.getMaxTemperature() == null : this.getMaxTemperature().equals(other.getMaxTemperature()))
            && (this.getReservedFields1() == null ? other.getReservedFields1() == null : this.getReservedFields1().equals(other.getReservedFields1()))
            && (this.getReservedFields2() == null ? other.getReservedFields2() == null : this.getReservedFields2().equals(other.getReservedFields2()))
            && (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime()))
            && (this.getCreateBy() == null ? other.getCreateBy() == null : this.getCreateBy().equals(other.getCreateBy()))
            && (this.getUpdateTime() == null ? other.getUpdateTime() == null : this.getUpdateTime().equals(other.getUpdateTime()))
            && (this.getUpdateBy() == null ? other.getUpdateBy() == null : this.getUpdateBy().equals(other.getUpdateBy()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getThreId() == null) ? 0 : getThreId().hashCode());
        result = prime * result + ((getPrisonTypeId() == null) ? 0 : getPrisonTypeId().hashCode());
        result = prime * result + ((getPrisonTypeName() == null) ? 0 : getPrisonTypeName().hashCode());
        result = prime * result + ((getChannel() == null) ? 0 : getChannel().hashCode());
        result = prime * result + ((getMaxVoltage() == null) ? 0 : getMaxVoltage().hashCode());
        result = prime * result + ((getMiniVoltage() == null) ? 0 : getMiniVoltage().hashCode());
        result = prime * result + ((getMaxCurrent() == null) ? 0 : getMaxCurrent().hashCode());
        result = prime * result + ((getType() == null) ? 0 : getType().hashCode());
        result = prime * result + ((getMiniCurrent() == null) ? 0 : getMiniCurrent().hashCode());
        result = prime * result + ((getMaxTemperature() == null) ? 0 : getMaxTemperature().hashCode());
        result = prime * result + ((getReservedFields1() == null) ? 0 : getReservedFields1().hashCode());
        result = prime * result + ((getReservedFields2() == null) ? 0 : getReservedFields2().hashCode());
        result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode());
        result = prime * result + ((getCreateBy() == null) ? 0 : getCreateBy().hashCode());
        result = prime * result + ((getUpdateTime() == null) ? 0 : getUpdateTime().hashCode());
        result = prime * result + ((getUpdateBy() == null) ? 0 : getUpdateBy().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", threId=").append(threId);
        sb.append(", prisonTypeId=").append(prisonTypeId);
        sb.append(", prisonTypeName=").append(prisonTypeName);
        sb.append(", channel=").append(channel);
        sb.append(", maxVoltage=").append(maxVoltage);
        sb.append(", miniVoltage=").append(miniVoltage);
        sb.append(", maxCurrent=").append(maxCurrent);
        sb.append(", type=").append(type);
        sb.append(", miniCurrent=").append(miniCurrent);
        sb.append(", maxTemperature=").append(maxTemperature);
        sb.append(", reservedFields1=").append(reservedFields1);
        sb.append(", reservedFields2=").append(reservedFields2);
        sb.append(", createTime=").append(createTime);
        sb.append(", createBy=").append(createBy);
        sb.append(", updateTime=").append(updateTime);
        sb.append(", updateBy=").append(updateBy);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}